package 实验二;

public class Course {
    private String id;            // 课程编号
    private String courseName;    // 课程名称
    private String location;      // 上课地点
    private String time;          // 上课时间
    private Teacher teacher;      // 授课教师
    private int credits;          // 课程学分

    // 构造方法
    public Course(String id, String courseName, String location, String time, int credits, Teacher teacher) {
        this.id = id;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
        this.teacher = teacher;
        this.credits = credits;  
    }

    // getter 和 setter 方法
    public String getId() { 
        return id; 
    }

    public void setId(String id) { 
        this.id = id; 
    }

    public String getCourseName() { 
        return courseName; 
    }

    public void setCourseName(String courseName) { 
        this.courseName = courseName; 
    }

    public String getLocation() { 
        return location; 
    }

    public void setLocation(String location) { 
        this.location = location; 
    }

    public String getTime() { 
        return time; 
    }

    public void setTime(String time) { 
        this.time = time; 
    }

    public Teacher getTeacher() { 
        return teacher; 
    }

    public void setTeacher(Teacher teacher) { 
        this.teacher = teacher; 
    }

    public int getCredits() { 
        return credits; 
    }

    public void setCredits(int credits) { 
        this.credits = credits; 
    }
}


